<html>
<head><meta charset="utf-8"><title>alias a dependency from a git source · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/alias.20a.20dependency.20from.20a.20git.20source.html">alias a dependency from a git source</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207476933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/alias%20a%20dependency%20from%20a%20git%20source/near/207476933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/alias.20a.20dependency.20from.20a.20git.20source.html#207476933">(Aug 20 2020 at 00:19)</a>:</h4>
<p>From a question on the official rust discord:</p>
<blockquote>
<p>does anybody know how to specify a cargo dependency where the source is git but the crate name is different from the workspace structure?</p>
</blockquote>
<p>the author tried to use <code>package</code> key but it doesn't work with git dependencies</p>



<a name="207477271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/alias%20a%20dependency%20from%20a%20git%20source/near/207477271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Toby Lawrence <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/alias.20a.20dependency.20from.20a.20git.20source.html#207477271">(Aug 20 2020 at 00:24)</a>:</h4>
<p>specifically: <a href="https://github.com/bikeshedder/deadpool">https://github.com/bikeshedder/deadpool</a></p>
<p>in my case, I have a fork of that repo.  the crate I want to import is <code>deadpool-redis</code>, but it's under the <code>redis</code> folder in the top-level.  the top-level Cargo.toml also refers to <code>redis</code> and not <code>deadpool-redis</code>.</p>



<a name="207477743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/alias%20a%20dependency%20from%20a%20git%20source/near/207477743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Toby Lawrence <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/alias.20a.20dependency.20from.20a.20git.20source.html#207477743">(Aug 20 2020 at 00:33)</a>:</h4>
<p>turns out they may have just been some weirdness, corrupt lock file or something... seems to work now after cleaning up my working directory and respecifying my git dependency, etc</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>